package md.lanjing.com.module_wallet.ui.adapter;

import android.support.annotation.Nullable;
import android.util.Log;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lxh.baselibray.util.TimeUtils;

import java.util.List;

import md.lanjing.com.module_wallet.R;
import md.lanjing.com.module_wallet.bean.ChargeDrawRecordResponce;


/**
 * 提充记录 adapter
 */
public class ChargeDrawRecordAdapter extends BaseQuickAdapter<ChargeDrawRecordResponce.DataBean,BaseViewHolder> {
    public ChargeDrawRecordAdapter(int layoutResId, @Nullable List<ChargeDrawRecordResponce.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ChargeDrawRecordResponce.DataBean item) {

        Log.e("asd",item.getTime()+"");
        helper.setText(R.id.tv_type,item.getType()==1?"充币":"提币")
                .setText(R.id.tv_time, TimeUtils.millis2String(item.getTime()))
                .setText(R.id.tv_money,!"0".equals(item.getUsdtNum())&&!"0.0".equals(item.getUsdtNum())?item.getUsdtNum()+"USDT":item.getCawdNum()+"CAWD");

    }
}
